package sundries

import (
	"trpg-common/constants"
	"trpg-common/utils/gorm_util"
	"trpg-message/entity"
)

type Boton struct {
}

func (b Boton) Handle(message entity.Message, arg string) string {
	return b.handle(message.RoomId, arg)
}

func (botoff Boton) handle(groupId int64, argString string) string {
	gorm_util.UpdateBatchByParamBuilderAndMap(gorm_util.NewParamBuilder().
		Model(&entity.Room{}).Eq("id", groupId).
		Eq("is_delete", constants.DeleteNo),
		map[string]interface{}{
			"bot_on": true,
		})
	return "Alice唤醒成功"
}
